#ifndef __UMTYPE_H__
#define __UMTYPE_H__

#include "umdef.h"
#include <stdint.h>
#include <stdbool.h>

#ifdef __cplusplus
#  define	__I		volatile		/*!< defines 'read only' permissions      */
#else
#  define	__I		volatile const	/*!< defines 'read only' permissions      */
#endif
#define     __O     volatile		/*!< defines 'write only' permissions     */
#define     __IO    volatile		/*!< defines 'read / write' permissions   */



#if defined(STM32F4XX_LD)  || defined(STM32F4XX_MD) || defined(STM32F4XX_HD) || defined(STM32F4XX)
#  include "stm32f4xx.h"
#elif defined(STM32F10X_LD)  || defined(STM32F10X_MD) || defined(STM32F10X_HD)
#  include "stm32f10x.h"
#else
	typedef    char             s8;
	typedef    unsigned char    u8;


	typedef    unsigned int     u16;
	typedef    short            s16;

	typedef    unsigned long    u32;
	typedef    long             s32;
#endif


//typedef    unsigned char    byte;
//typedef    unsigned char    BYTE;
//typedef    unsigned char    uchar;
//typedef    unsigned char    UCHAR;
//typedef    unsigned char    uint8;
//// typedef    unsigned char    uint8_t;
//typedef    unsigned char    UINT8;
//typedef    unsigned char    BOOL;
//typedef    signed  char     int8;
//typedef    signed  char     INT8;
//
////  2 bytes
//
//typedef    unsigned int     uint;
//typedef    unsigned int     UINT;
//typedef    unsigned int     word;
//typedef    unsigned int     WORD;
//typedef    unsigned int     uint16;
//// typedef    unsigned int     uint16_t;
//typedef    unsigned int     UINT16;
//typedef    int              int16;
//typedef    int              INT16;
//
////  4 bytes
//
//typedef    unsigned long    dword;
//// typedef    unsigned long    DWORD;
//typedef    unsigned long    uint32;
//typedef    unsigned long    UINT32;
//// typedef    unsigned long    uint32_t;
//typedef    long             int32;
//typedef    long             INT32;

//typedef    unsigned char    bool;
//typedef    unsigned char    BOOL;


#ifndef u64
	typedef    unsigned long  long         u64;
#endif
#ifndef U64
	typedef    unsigned long  long         U64;
#endif

#ifndef s64
	typedef    signed long  long           s64;
#endif
#ifndef S64
	typedef    signed long  long           S64;
#endif

typedef __IO u8      vu8;
typedef __IO u16     vu16;
typedef __IO u32     vu32;
typedef __IO u64     vu64;

typedef __IO s8      vs8;
typedef __IO s16     vs16;
typedef __IO s32     vs32;
typedef __IO s64     vs64;

// below   qt_types
//---------------------------------------
typedef u8  quint8;
typedef u16 quint16;
typedef u32 quint32;
typedef u64 quint64;

typedef s8  qint8;
typedef s16 qint16;
typedef s32 qint32;
typedef s64 qint64;

typedef   char* QString;
typedef   char* string;

#endif
